1. Field of the Invention
The present invention generally relates to an image processing technique, in particular, to a method for generating an orientation image.
2. Description of Related Art
Edge detection is a critical pre-processing step of object detection in the field of computer vision and image processing. The term “edge” is referred to as a set of neighboring pixels with sharp variation in an image, i.e. regions with discontinuous and rough neighboring pixels. In general, after edge detection is performed on an image in a horizontal and a vertical direction, a gradient intensity and a gradient orientation of each pixel may be accordingly calculated. Thus, image feature extraction may be performed in a follow-up process through, for example, a histogram of oriented gradient (HoG) technique so as to detect an object in the image.
However, given a horizontal gradient Gx and a vertical gradient Gy of a pixel, efficient execution or sufficient memory space is required. For example, to obtain a gradient orientation of the pixel via an arcsine lookup table approach, it is necessary to compute the term
      Gx                            Gx          2                +                  Gy          2                      ,and yet a square-root computation is expensive for a low-cost chip. On the other hand, to obtain the gradient orientation via an arctangent lookup table approach, since the value of
  Gy  Gxranges between −∞ and +∞, an arctangent lookup table may not provide enough coverage for all inputs. Additionally, to obtain the gradient orientation via a two-dimensional arctangent lookup table approach such that the lookup table is constructed based on positive and negative signs of horizontal gradients Gx and vertical gradients Gy as well as
      Gy    Gx    ,large memory space is required for storing such two-dimensional lookup table. The two-dimensional lookup table may be unfavorable to be loaded into an on-chip memory for real-time computation.